﻿using System;
using UnityEngine;

namespace Valve.VR.InteractionSystem
{
	// Token: 0x02000620 RID: 1568
	public class LinearDisplacement : MonoBehaviour
	{
		// Token: 0x060027A4 RID: 10148 RVA: 0x000E6D40 File Offset: 0x000E4F40
		private void Start()
		{
			this.initialPosition = base.transform.localPosition;
			if (this.linearMapping == null)
			{
				this.linearMapping = base.GetComponent<LinearMapping>();
			}
		}

		// Token: 0x060027A5 RID: 10149 RVA: 0x000E6D70 File Offset: 0x000E4F70
		private void Update()
		{
			if (this.linearMapping)
			{
				base.transform.localPosition = this.initialPosition + this.linearMapping.value * this.displacement;
			}
		}

		// Token: 0x040027A6 RID: 10150
		public Vector3 displacement;

		// Token: 0x040027A7 RID: 10151
		public LinearMapping linearMapping;

		// Token: 0x040027A8 RID: 10152
		private Vector3 initialPosition;
	}
}
